<template>
  <div class="form-info-container">
    <el-form :inline="true" class="demo-form-inline">
      <el-form-item label="起止时间:">
        <el-form-item prop="date1">
          <el-date-picker type="date" placeholder="Pick a date" style="width: 100%" />
        </el-form-item>
        <span class="text-gray-500 mar-r-13">至</span>
        <el-form-item prop="date2">
          <el-date-picker type="date" placeholder="Pick a date" style="width: 100%" />
        </el-form-item>
        <el-form-item>
          <div class="flex">
            <div v-for="(item, index) of btnList" :key="index" class="btn-box cursor-p pad-l-14 font-14 pad-r-14 mar-l-20" :class="index === btnIndex ? 'active-btn-box': 'disactive-btn-box'" @click="changeBtn(index)">{{ item }}</div>
          </div>
        </el-form-item>
      </el-form-item>
    </el-form>
    <el-form :inline="true" class="demo-form-inline flex">
      <el-form-item label="订单搜索:" prop="name">
        <el-input placeholder="订单号/平台订单号" />
      </el-form-item>
      <el-form-item label="搜索买家:" prop="name" class="space">
        <el-input placeholder="买家姓名/买家电话" />
      </el-form-item>
      <el-form-item label="平台类型:" class="space">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
    </el-form>
    <el-form :inline="true" class="demo-form-inline flex">
      <el-form-item label="平台店铺:" prop="name">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="支付类型:" class="space">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="订单状态:" class="space">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
    </el-form>
    <el-form :inline="true" class="demo-form-inline flex">
      <el-form-item label="售后状态:" prop="name">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="异常类型:" class="space">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
      <el-form-item label="同步状态:" class="space">
        <el-select v-model="platformType" placeholder="请选择">
          <el-option label="Zone one" value="shanghai" />
          <el-option label="Zone two" value="beijing" />
        </el-select>
      </el-form-item>
    </el-form>
    <div class="flex" style="align-items: baseline;">
      <div>
        <el-form>
          <el-form-item label="商品来源:">
            <el-select v-model="platformType" placeholder="请选择">
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
        </el-form>
      </div>
      <div class="v-align-c" style="margin-left:36px">
        <div class="search-btn cursor-p font-14 flex flex-center">查询</div>
        <el-button type="text" size="default" class="mar-l-24">同步设置</el-button>
        <el-button type="text" size="default" class="mar-l-24">添加店铺</el-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'

export default defineComponent({
  setup() {
    const btnList:string[] = ['今', '昨', '7天', '1个月', '3个月']
    const btnIndex = ref(0)
    const platformType = ref('')
    const changeBtn = (index:number):void => {
      btnIndex.value = index
    }
    return {
      btnList,
      btnIndex,
      changeBtn,
      platformType
    }
  }
})
</script>

<style lang="scss" scoped>
.form-info-container {
  padding-bottom: 24px;
  border-bottom: 1px solid #F5F6FA;
  ::v-deep(.el-input__inner) {
    width: 223px;
  }
  .space {
    margin-left: 59px;
  }
  .btn-box {
    border: 1px solid #DCDFE6;
    border-radius: 4px;
  }
  .active-btn-box {
    color: #2DE2DD;
    background: #0C213F;
  }
  .disactive-btn-box {
    color: #323233;
    background: #fff;
  }
  .search-btn {
    width: 68px;
    height: 40px;
    background: #0C213F;
    border-radius: 4px;
    color: #fff;
  }
}
</style>
